#!/usr/bin/env node

//类
const Koa = require('koa');
const logger = require('./middleware/logger.js');

const app = new Koa();

app.use(logger);

app.use((ctx,next)=>{ //M-hello中间件
  //setTimeout(()=>{

  
  ctx.body = 'hello world!';
  
  //},2000);
});

app.listen(8080);

console.log('hello koa2');
